package leetcode.code413;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution413 implements IDebug {

	public abstract int numberOfArithmeticSlices(int[] nums);

	@Override
	public void debug1() {
//		输入：nums = [1,2,3,4]
//		输出：3
		String str1 = "[1,2,3,4]";
		int expect = 3;
		this.debug(str1, expect);
	}

	private void debug(String str1, int expect) {
		int[] nums = HelpDebug.str2array3(str1);
		int result = this.numberOfArithmeticSlices(nums);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		String str1 = "[1]";
		int expect = 0;
		this.debug(str1, expect);
	}

	@Override
	public void debug3() {
		String str1 = "[2,1,3,4,2,3]";
		int expect = 0;
		this.debug(str1, expect);
	}

	@Override
	public void debug4() {
		String str1 = "[-1,-2,-3]";
		int expect = 1;
		this.debug(str1, expect);
	}

}
